#
# @lc app=leetcode.cn id=69 lang=python3
#
# [69] x 的平方根
#

# @lc code=start
class Solution:
    def mySqrt(self, x: int) -> int:
        if x == 1: return 1
        n = x // 2
        while n * n > x:
            n = (n + x / n) // 2
        return int(n)
# @lc code=end

